package com.huatai.datacenter.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author Lion
 * @date 2023/3/20  11:00
 */
@Data
public class BaseEntity {

	@TableId
	@ApiModelProperty("数据源id")
	private Long id;

	@TableField(value = "create_time", fill = FieldFill.INSERT)
	@ApiModelProperty("创建时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private LocalDateTime createTime;

	@TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
	@ApiModelProperty("更新时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private LocalDateTime updateTime;

	@TableField("spare1")
	@ApiModelProperty("备用字段")
	private String spare1;

	@TableField("spare2")
	@ApiModelProperty("备用字段")
	private String spare2;
}
